//
//  HRMainNavigationController.m
//  网易彩票
//
//  Created by rui on 6/29/15.
//  Copyright © 2015 loverforevercyr. All rights reserved.
//

#import "HRMainNavigationController.h"

@interface HRMainNavigationController ()

@end

@implementation HRMainNavigationController

+ (void)initialize {
    [super initialize];
    
////  [UINavigationBar appearance]
    // 获取哪个类下面的导航条
    UINavigationBar *bar = [UINavigationBar appearanceWhenContainedIn:self, nil];
//    [bar setBackgroundImage:[UIImage imageNamed:@"NavBar64"] forBarMetrics:UIBarMetricsDefault];
    [bar setBackgroundColor:[UIColor clearColor]];
    
    [bar setTintColor:[UIColor whiteColor]];
    
    // 设置UINavigationBar的文字属性
    NSMutableDictionary *titleAttributes = [NSMutableDictionary dictionary];
    titleAttributes[NSForegroundColorAttributeName] = [UIColor whiteColor];
    titleAttributes[NSFontAttributeName] = [UIFont systemFontOfSize:20];
    bar.titleTextAttributes =titleAttributes;
    
    // 设置返回按钮不显示文字
    UIBarButtonItem *barButtonItem = [UIBarButtonItem appearanceWhenContainedIn:self, nil];
    [barButtonItem setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -100) forBarMetrics:UIBarMetricsDefault];
//    [barButtonItem setBackButtonBackgroundImage:[UIImage imageNamed:@"NavBack"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];

}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
